<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>注册</title>
</head>
<body>
	<form action="" method="">
	用户名 :<input type="text" name="username" id="i1"><br>
	 密码: <input type="password" name="password" id="i2"><br>
	<input type="button" value="提交" id="i3">
	</form>
</body>
	<script type="text/javascript" src="Js/jquery-1.11.0.js"></script>
	<script type="text/javascript">
		// 绑定失去焦点事件
		$("#i1").blur(function(){
			// 获得输入的值
			var val = $("#i1").val();
			// 异步发送请求 ajax
			$.ajax({
				url:"ZhuCe2",
				type:"post",
				data:{"usernameJson":val},
				success:function(qqq){   // 返回状态码
					alert(qqq.code+"-"+qqq.msg)
				},
				error:function(){
					alert("服务器正忙,请稍候再试");
				}
			});
			
		});
		
	</script>
	
</html>